<div class="row">
	<div class="col-sm-8">
		<div class="page-header">
			<h2>创建&nbsp;Lemonce&nbsp;账号</h2>
		</div>
		<form id="userInfoFrom" name="userForm" class="grid" style="max-width:400px">
			<div class="form-group">
				<label>用户名</label>
				<input id="account-name" type="text" name="username"
					class="form-control"
					required ng-minlength="6" ng-maxlength="16"
					ng-blur="checkExisted('username')" ng-model="newUser.username"
					ng-change="change('username')" />
				<div id="name-rule" class="help-block" ng-messages="userForm.username.$error">
					<div ng-message="required">用户名不为空</div>
					<div ng-message="minlength">不少于6个字符</div>
					<div ng-message="maxlength">不超过16个字符</div>
				</div>
				<div id="name-repeat" ng-show="checkusername" class="help-block">用户名重复</div>
			</div>

			<div class="form-group">
				<label>邮箱</label>
				<input id="account-email" type="email" name="email" ng-model="newUser.email"
					class="form-control"
					required ng-pattern="/^[a-zA-Z0-9._]+@[a-zA-Z0-9\-]+\.[a-z]{2,4}(\.[a-z]{2})?$/"
					ng-blur="checkExisted('email')"
					ng-change="change('email')" />
				<div id="email-rule" ng-messages="userForm.email.$error" class="help-block">
					<div ng-message="required">邮箱不为空</div>
					<div ng-message="pattern">请输入正确格式的邮箱</div>
				</div>
				<div id="emial-repeat" ng-show="checkemail" class="help-block">邮箱重复</div>
			</div>

			<div class="form-group">
				<label>密码</label>
				<input id="account-password" type="password" name="password"
					class="form-control"
					required ng-minlength="8" ng-maxlength="20"
					ng-pattern="/^[a-zA-Z0-9!@#$%^&*()]*$/" ng-model="newUser.password">
				<div id="password-rule" ng-messages="userForm.password.$error" class="help-block">
					<div ng-message="required">密码不为空</div>
					<div ng-message="minlength">不少于8个字符</div>
					<div ng-message="maxlength">不超过20个字符</div>
					<div ng-message="pattern">您输入了非法字符</div>
				</div>
			</div>

			<div class="form-group">
				<label>再次确认密码</label>
				<input id="account-password-confirm" type="password" name="confirm"
					class="form-control"
					ng-model="user.confirm"
					ng-pattern="newUser.password" required>
				<div id="confirm-rule" ng-messages="userForm.confirm.$error" class="help-block">
					<div ng-message="pattern">两次输入不一致</div>
				</div>
			</div>

			<div class="form-group">
				<label>验证码</label>
				<input id="register-captcha" type="text" name="captcha"
					class="form-control"
					style="width:6em"
					ng-model="captcha" ng-model-options="{getterSetter:true}"/>
				<div ng-show="captchaInfo" class="help-block" id="captcha-correct">验证码输入错误</div>
				<img ng-src="{{app.APIOrigin}}manager/user/captcha?time={{captchaTime}}"
					style="float:right"
					ng-click="getNow()">
			</div>

			<button class="btn btn-success"
				ng-disabled="!userForm.$valid||captcha().length!=4"
				ng-click="register()">注册</button>
		</form>
	</div>
	<div id="sideBar" class="col-sm-3 col-sm-offset-1 hidden-xs">
		<h4>欢迎注册</h4>
		<p>欢迎您注册Lemonce账号。</p>
		<p>使用账号可以使用完整的探针，完整的探针功能包括：测试用例创建、安排测试任务、测试管理、查看测试报告。</p>
		<p></p>
	</div>
</div>
